package com.cencat.user.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 用户权限查询DTO
 * @author cencat
 * @since 2024-01-01
 */
@Data
@Schema(description = "用户权限查询条件")
public class UserPermissionQueryDTO {

    @Schema(description = "用户ID", example = "1")
    private Long userId;

    @Schema(description = "权限ID", example = "1")
    private Long permissionId;

    @Schema(description = "租户ID", example = "1")
    private Long tenantId;

    @Schema(description = "用户名", example = "admin")
    private String username;

    @Schema(description = "权限编码", example = "user:create")
    private String permissionCode;

    @Schema(description = "权限名称", example = "创建用户")
    private String permissionName;

    @Schema(description = "状态：1-有效，0-无效", example = "1")
    private Integer status;

    @Schema(description = "授权人ID", example = "1")
    private Long grantedBy;

    @Schema(description = "授权开始时间")
    private LocalDateTime grantedTimeStart;

    @Schema(description = "授权结束时间")
    private LocalDateTime grantedTimeEnd;

    @Schema(description = "权限过期开始时间")
    private LocalDateTime expireTimeStart;

    @Schema(description = "权限过期结束时间")
    private LocalDateTime expireTimeEnd;

    @Schema(description = "创建开始时间")
    private LocalDateTime createTimeStart;

    @Schema(description = "创建结束时间")
    private LocalDateTime createTimeEnd;

    @Schema(description = "关键词搜索（用户名或权限名称）")
    private String keyword;
}